Keybinding to open the application menu.
</description>
</key>
+ <key name="shift-overview-up" type="as">
+ <default>["<Super><Alt>Up"]</default>
+ <summary>Keybinding to shift between overview states</summary>
+ <description>
+ Keybinding to shift between session, window picker and app grid
+ </description>
+ </key>
+ <key name="shift-overview-down" type="as">
+ <default>["<Super><Alt>Down"]</default>
+ <summary>Keybinding to shift between overview states</summary>
+ <description>
+ Keybinding to shift between app grid, window picker and session
+ </description>
+ </key>
<key name="toggle-application-view" type="as">
<default>["<Super>a"]</default>
<summary>Keybinding to open the “Show Applications” view</summary>
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
this._toggleAppsPage.bind(this));
+ Main.wm.addKeybinding('shift-overview-up',
+ new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ () => this._shiftState(Meta.MotionDirection.UP));
+
+ Main.wm.addKeybinding('shift-overview-down',
+ new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ () => this._shiftState(Meta.MotionDirection.DOWN));
+
this.connect('destroy', this._onDestroy.bind(this));
this._update();
}
}
+ _shiftState(direction) {
+ let { currentState, finalState } = this._stateAdjustment.getStateTransitionParams();
+
+ if (direction === Meta.MotionDirection.DOWN)
+ finalState = Math.max(finalState - 1, ControlsState.HIDDEN);
+ else if (direction === Meta.MotionDirection.UP)
+ finalState = Math.min(finalState + 1, ControlsState.APP_GRID);
+
+ if (finalState === currentState)
+ return;
+
+ if (currentState === ControlsState.HIDDEN &&
+ finalState === ControlsState.WINDOW_PICKER) {
+ Main.overview.show();
+ } else if (finalState === ControlsState.HIDDEN) {
+ Main.overview.hide();
+ } else {
+ this._stateAdjustment.ease(finalState, {
+ duration: SIDE_CONTROLS_ANIMATION_TIME,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ onComplete: () => {
+ this.dash.showAppsButton.checked =
+ finalState === ControlsState.APP_GRID;
+ },
+ });
+ }
+ }
+
_onDestroy() {
global.workspace_manager.disconnect(this._nWorkspacesNotifyId);
}